import { exec } from "child_process";

export function runCmd(cmd: string): Promise<string> {
  return new Promise((resolve, reject) => {
    exec(cmd, (error, result) => {
      error ? reject(error) : resolve(result.trimRight());
    });
  });
}
